from langchain_community.document_loaders import UnstructuredWordDocumentLoader
from langchain_core.documents import Document


# Simple and fast text extraction
async def load(path: str) -> list[Document]:
    loader = UnstructuredWordDocumentLoader(path)
    pages = []
    async for page in loader.alazy_load():
        pages.append(page)
    return pages
